package com.yonyou.cyxdms.basedata.service.dto.vehiclemodel;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yonyou.cyx.function.utils.jsonserializer.localdatetime.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 配置 - 新增/编辑DTO
 *
 * @author Tansj
 * @since 18:30 2019-11-18
 */
@ApiModel(value = "PackageModifyDTO", description = "配置 - 新增/编辑DTO")
public class PackageModifyDTO {

    @ApiModelProperty(value = "配置主键ID-编辑时必传，新增传递null")
    private Long packageId;

    @ApiModelProperty(value = "品牌ID-品牌名称下拉框传递品牌ID")
    @NotNull(message = "品牌名称不能为空")
    private Long brandId;

    @ApiModelProperty(value = "车系ID-车系名称下拉框传递车系ID")
    @NotNull(message = "车系名称不能为空")
    private Long seriesId;

    @ApiModelProperty(value = "车型ID-车型名称下拉框传递车型ID")
    @NotNull(message = "车型名称不能为空")
    private Long modelId;

    @ApiModelProperty(value = "配置代码")
    @NotNull(message = "配置代码不能为空")
    private String configCode;

    @ApiModelProperty(value = "配置名称")
    @NotNull(message = "配置名称不能为空")
    private String configName;

    @ApiModelProperty(value = "数据来源")
    private Integer dataSources;

    @ApiModelProperty(value = "是否启用")
    private Integer isValid;

    @ApiModelProperty(value = "版本号-编辑时必传")
    private Integer recordVersion;

    @ApiModelProperty(value = "启用时间")
    @JsonDeserialize(using = JsonLocalDateTimeQueryBeginDeserializer.class)
    @JsonSerialize(using = JsonLocalDateTimeQueryBeginSerializer.class)
    private LocalDateTime startDate;

    @ApiModelProperty(value = "启用标识")
    private Integer startType;

    @ApiModelProperty(value = "PNO2有效开始日期")
    private LocalDateTime validStartDate;

    @ApiModelProperty(value = "PNO2有效结束日期")
    private LocalDateTime validEndDate;

    public Long getPackageId() {
        return packageId;
    }

    public void setPackageId(Long packageId) {
        this.packageId = packageId;
    }

    public Long getBrandId() {
        return brandId;
    }

    public void setBrandId(Long brandId) {
        this.brandId = brandId;
    }

    public Long getSeriesId() {
        return seriesId;
    }

    public void setSeriesId(Long seriesId) {
        this.seriesId = seriesId;
    }

    public Long getModelId() {
        return modelId;
    }

    public void setModelId(Long modelId) {
        this.modelId = modelId;
    }

    public String getConfigCode() {
        return configCode;
    }

    public void setConfigCode(String configCode) {
        this.configCode = configCode;
    }

    public String getConfigName() {
        return configName;
    }

    public void setConfigName(String configName) {
        this.configName = configName;
    }

    public Integer getDataSources() {
        return dataSources;
    }

    public void setDataSources(Integer dataSources) {
        this.dataSources = dataSources;
    }

    public Integer getIsValid() {
        return isValid;
    }

    public void setIsValid(Integer isValid) {
        this.isValid = isValid;
    }

    public Integer getRecordVersion() {
        return recordVersion;
    }

    public void setRecordVersion(Integer recordVersion) {
        this.recordVersion = recordVersion;
    }

    public LocalDateTime getStartDate() {
        return startDate;
    }

    public void setStartDate(LocalDateTime startDate) {
        this.startDate = startDate;
    }

    public Integer getStartType() {
        return startType;
    }

    public void setStartType(Integer startType) {
        this.startType = startType;
    }

    public LocalDateTime getValidStartDate() {
        return validStartDate;
    }

    public void setValidStartDate(LocalDateTime validStartDate) {
        this.validStartDate = validStartDate;
    }

    public LocalDateTime getValidEndDate() {
        return validEndDate;
    }

    public void setValidEndDate(LocalDateTime validEndDate) {
        this.validEndDate = validEndDate;
    }

    @Override
    public String toString() {
        return "PackageModifyDTO{" +
                "packageId=" + packageId +
                ", brandId=" + brandId +
                ", seriesId=" + seriesId +
                ", modelId=" + modelId +
                ", configCode='" + configCode + '\'' +
                ", configName='" + configName + '\'' +
                ", dataSources=" + dataSources +
                ", isValid=" + isValid +
                ", recordVersion=" + recordVersion +
                ", startType=" + startType +
                ", startDate=" + startDate +
                '}';
    }
}
